
const modal = document.querySelector('.mymodal');
const popupContainer = document.querySelector('.popup-container');
const openPopupBtn = document.querySelector('button');
const closePopupBtn = document.querySelector('.close-btn');

openPopupBtn.addEventListener('click', openPopup);
closePopupBtn.addEventListener('click', closePopup);
modal.addEventListener('click', closePopup);
function openPopup() {
    modal.style.opacity = '0.5';
    modal.style.visibility = 'visible';
    popupContainer.style.opacity = '0.5';
    popupContainer.style.visibility = 'visible';
}

function closePopup() {
    modal.style.opacity = '0';
    modal.style.visibility = 'hidden';
    popupContainer.style.opacity = '0';
    popupContainer.style.visibility = 'hidden';
}